﻿using Microsoft.Practices.Prism.StoreApps;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml.Controls;

namespace JV.Com.Internals
{
    public abstract class PageBase : VisualStateAwarePage
    {
        public PageBase()
        {
        }

        protected async void SearchBox_SuggestionsRequested(SearchBox sender, SearchBoxSuggestionsRequestedEventArgs args)
        {
            await (DataContext as PageBaseViewModel).OnSearchSuggestionsRequested(args.QueryText, args.Request);
        }

        protected void SearchBox_QuerySubmitted(SearchBox sender, SearchBoxQuerySubmittedEventArgs args)
        {
            (DataContext as PageBaseViewModel).OnSearchQuerySubmitted(args.QueryText);
        }
    }
}
